package edu.scau.pos.vo;

import edu.scau.core.Enum.OrderStatus;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class RefundOrderVo  implements Serializable {
 private static final long serialVersionUID = 1L;
 @Schema(name = "orderId",description = "订单编号", type = "String")
 @NotBlank(message = "订单ID不能为空")
 private String orderId;
 @Schema(name = "type",description = "操作类型：0:取消预定,1:退货退款")
 @NotNull(message = "请选择操作类型")
 private int type;
 @Schema(name = "applyDate",description = "申请日期",type = "Date")
 @Hidden
 private Date applyDate;
// @Schema(name = "status", description = "订单状态", implementation = OrderStatus.class)
// private int status;
 @Schema(name = "desc",description = "退货理由",type = "String")
 @Hidden
 private String desc;
 @ArraySchema(schema = @Schema(implementation = SaleLineItemVo.class))
 @Schema(name = "refundItemList", description = "退单商品列表",required = false)
 @NotEmpty(message = "退货商品不能为空")
 private List<SaleLineItemVo> refundItemList;

    public RefundOrderVo(String orderId, int type, Date applyDate, String desc, List<SaleLineItemVo> refundItemList) {
        this.orderId = orderId;
        this.type = type;
        this.applyDate = applyDate;
        this.desc = desc;
        this.refundItemList = refundItemList;
    }

    public RefundOrderVo() {
    }
}
